home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3061 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.eunet.fi!fipnet!kone!jsaarinen
  2. Newsgroups: comp.sys.amiga.programmer
  3. X-NewsReader: IntuiNews 1.2b (31.7.94)
  4. References: <DMEpMn.Cvs.0.-s@cs.vu.nl>
  5. From: "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi>
  6. Date: Sat, 10 Feb 96 11:45:08 UT
  7. Comments: Illegal date header - new date added by quicknews
  8. X-Original-Date: Sat, 10 Feb 96 12:39:29 
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: binary
  12. Subject: Re: 90 degree rotation
  13. Message-ID: <38232373@kone.fipnet.fi>
  14.  
  15.  
  16. > Wouldn't it be wise to write the walls in a 90 degree rotated fashion?
  17.  
  18. Not actually, because floor/ceiling has to be drawn too.
  19.  
  20. > I mean, not vertically, but horizontally. It might then be possible to
  21. > write whole longs at once, which is much faster than writing single bytes.
  22.  
  23. Not actually, since the individual bytes must be "collected"
  24. to a buffer register and this can be slower.
  25.  
  26. What is wise, when drawing walls, is to store the wall textures
  27. 90 degrees rotated. The walls are drawing by scaling vertical
  28. strips from the texture, now when the texture is rotated 90 degrees,
  29. it is scanling a horizontal strip.
  30.  
  31. The scaling loop is very simple:
  32.  
  33.         move.b  (a0,d0.w),(a1)  ;write pixel
  34.         addx.l  d1,d0           ;interpolate
  35.         add.l   a2,a1           ;move to the next line
  36.  
  37. Writing horizontally would be better on the 68040 though,
  38. I think..
  39.  
  40. --                               _
  41. a Stellar programmer          _ //
  42. "Amiga - back for the future" \X/
  43.